home *** CD-ROM | disk | FTP | other *** search
- ***********************************************************************
- * Function EOMD - Return the last date of the month
- *
- * Usage: d = EOMD(mdate)
- *
- * mdate = Any valid date
- *
- * Returns d, a date variable containing the last valid date of the
- * month
- ***********************************************************************
- FUNCTION eomd
- PARAMETERS pdate
- RETURN IIF(MONTH(pdate)<12, ;
- CTOD( STR(MONTH(pdate) + 1, 2) + "/01/" + STR(YEAR(pdate)) ) - 1,;
- CTOD("12/31/"+STR(YEAR(pdate))) )